﻿using Furion.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YJ_Core.Entities.Utils;

namespace YJ_App.Login.Dtos
{
    /// <summary>
    /// login
    /// </summary>
    public class LoginDto
    {
        /// <summary>
        /// 标准登录输出参数
        /// </summary>
        [SuppressSniffer]
        public class WebLoginResp : ResponseStatus
        {
            /// <summary>
            /// 权限组Id
            /// </summary>
            public string PermissionGroupId { get; set; }

            /// <summary>
            /// 用户id
            /// </summary>
            public string UserId { get; set; }

            /// <summary>
            /// 用户名
            /// </summary>
            public string UserName { get; set; }

            /// <summary>
            /// 用户昵称
            /// </summary>
            public string UserNick { get; set; }

            /// <summary>
            /// 数据权限
            /// </summary>
            public string DataPermissions { get; set; }

            /// <summary>
            /// 用户类型：
            /// 平台：0
            /// 个体：1
            /// 商家：2
            /// </summary>
            public int UserType { get; set; }

            /// <summary>
            /// 用户类型文本
            /// </summary>
            public string UserTypeText { get; set; }

            /// <summary>
            /// Token
            /// </summary>
            public string AccessToken { get; set; }

            /// <summary>
            /// 签发时间
            /// </summary>
            public DateTimeOffset SigninedTime { get; set; }

            /// <summary>
            /// 过期时间
            /// </summary>
            public long ExpiredTime { get; set; }

            /// <summary>
            /// 权限列表
            /// </summary>
            public List<string> PermissionList { get; set; }

            /// <summary>
            /// 上一次登录时间
            /// </summary>
            public string LastLoginTime { get; set; }

            /// <summary>
            /// 邮箱
            /// </summary>
            public string Email { get; set; }

            /// <summary>
            /// 头像路径
            /// </summary>
            public string HeadPortraitUrl { get; set; }

            /// <summary>
            /// 登录次数
            /// </summary>
            public int LoginCount { get; set; }

            /// <summary>
            /// 创建时间
            /// </summary>
            public DateTime? CreateTime { get; set; }
        }

        /// <summary>
        /// 邮箱-发件邮箱-输入
        /// </summary>
        public class SendEmailAsyncInput
        {
            /// <summary>
            /// 发件人账号
            /// </summary>
            public string UserName { get; set; }

            /// <summary>
            /// 邮箱
            /// </summary>
            public string Email { get; set; }

            /// <summary>
            /// 是否后台忘记密码
            /// </summary>
            public bool IsForgetPassword { get; set; }

            /// <summary>
            /// 是否小程序找回密码
            /// </summary>
            public bool IsAppletRetrievePsw { get; set; }

            /// <summary>
            /// 与前端一致，用户挡住大部分 “随手调用” 的请求
            /// email5297-2212-434e-8214-43eff560b974
            /// </summary>
            public string AccessToken { get; set; }

            /// <summary>
            /// 用于区分是否小程序请求
            /// </summary>
            public bool IsAppletRequest { get; set; }
        }

        /// <summary>
        /// 后台注册-输入
        /// </summary>
        public class BackgroundRegisterInput
        {
            /// <summary>
            /// 用户名
            /// </summary>
            public string UserName { get; set; }

            /// <summary>
            /// 密码
            /// </summary>
            public string Password { get; set; }

            /// <summary>
            /// 验证码
            /// </summary>
            public string VerificationCode { get; set; }

            /// <summary>
            /// 邮箱
            /// </summary>
            public string Email { get; set; }
        }

        /// <summary>
        /// 登录-输入
        /// </summary>
        public class LogInInput
        {
            /// <summary>
            /// 用户名
            /// </summary>
            public string UserName { get; set; }

            /// <summary>
            /// 密码
            /// </summary>
            public string Password { get; set; }

            /// <summary>
            /// 登录类型
            /// </summary>
            public int? UserType { get; set; }
        }

        /// <summary>
        /// 忘记密码验证校验（下一步）-输入
        /// </summary>
        public class ForgetPasswordVerifyInput
        {
            /// <summary>
            /// 验证码
            /// </summary>
            public string VerificationCode { get; set; }
        }

        /// <summary>
        /// 忘记密码-重置密码
        /// </summary>
        public class ForgetPasswordResetInput
        {
            /// <summary>
            /// 邮箱
            /// </summary>
            public string Email { get; set; }

            /// <summary>
            /// 新密码
            /// </summary>
            public string NewPassword { get; set; }

            /// <summary>
            /// 确认密码
            /// </summary>
            public string ConfirmPassword { get; set; }
        }

        /// <summary>
        /// 小程序注册-输入
        /// </summary>
        public class AppletRegisterInput
        {
            /// <summary>
            /// 邮箱
            /// </summary>
            public string Email { get; set; }

            /// <summary>
            /// 账号
            /// </summary>
            public string Account { get; set; }

            /// <summary>
            /// 密码
            /// </summary>
            public string Password { get; set; }

            /// <summary>
            /// 确认密码
            /// </summary>
            public string ConfirmPassword { get; set; }
        }

        /// <summary>
        /// 小程序登录-输入
        /// </summary>
        public class AppletLoginInput
        {
            /// <summary>
            /// 邮箱
            /// </summary>
            public string Email { get; set; }

            /// <summary>
            /// 账号密码：1
            /// 邮箱：2
            /// </summary>
            public int LoginType { get; set; }

            /// <summary>
            /// 账号
            /// </summary>
            public string Account { get; set; }

            /// <summary>
            /// 密码
            /// </summary>
            public string Password { get; set; }

            /// <summary>
            /// 验证码
            /// </summary>
            public string VerificationCode { get; set; }
        }

        /// <summary>
        /// 小程序找回密码-输入
        /// </summary>
        public class AppletRetrievePasswordInput
        {

            /// <summary>
            /// 邮箱
            /// </summary>
            public string Email { get; set; }

            /// <summary>
            /// 密码
            /// </summary>
            public string Password { get; set; }

            /// <summary>
            /// 确认密码
            /// </summary>
            public string ConfirmPassword { get; set; }
        }
    }
}
